home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacks & Cracks
/
Hacks_and_Cracks.iso
/
cracking software
/
word list maker.zip
/
dictmake.c
next >
Wrap
C/C++ Source or Header
|
1997-11-09
|
2KB
|
83 lines
/*
DictMaker v1.0
Written By: E-HACK (god@wilter.com)
Copyright ⌐ 1997 Wiltered Fire
All Rights Reserved.
If you use any ideas/code from this in a prog, gimme credit...
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
static char *letters[] = { "a","b","c","d","e","f","g","h","i","j","k","l","m",
"n","o","p","q","r","s","t","u","v","w","x","y","z","A",
"B","C","D","E","F","G","H","I","J","K","L","M","N","O",
"P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2",
"3","4","5","6","7","8","9" };
main()
{
int i, chars, c, passwords, d;
char *letter, *filename;
FILE *fp;
time_t t;
srand((unsigned) time(&t));
printf("\n DictMaker v1.0\n Written By: E-HACK\n\n");
printf(" Output file: ");
scanf("%s", filename);
printf(" Number of characters: ");
scanf("%d", &chars);
if(chars <= 1) {
printf(" Not enough characters!");
return(0);
}
printf(" Number of passwords: ");
scanf("%d", &passwords);
if(passwords <= 1) {
printf(" Not enough paswords!");
return(0);
}
d = 1;
fp = fopen(filename, "w");
fflush(fp);
if(fp == NULL) {
printf("\n Unable to write to %s", filename);
return(0);
}
printf("\n Creating %s with %d passwords", filename, passwords);
if(passwords >= 20000) { printf("...\n This might take a while"); }
while(d <= passwords)
{
d++;
c = 1;
while(c <= chars)
{
c++;
i = rand() % 62;
letter = letters[i];
fprintf(fp, "%s", letter);
}
fputs("\n", fp);
}
fclose(filename);
printf("\n\n Done writing %d passwords to %s\a", passwords, filename);
return(0);
}